package com.dream.oproject.base.web;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;


public class BaseController {
  
	private String context;
	
	@Autowired
	private HttpServletRequest httpRequest;
	
	@ModelAttribute("context")
	public String getContext() {
		if(context ==  null){
			context = httpRequest.getContextPath();
		}
		return context;
	}
    
	
}
